home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CCCCPPPP((((1111)))) CCCCPPPP((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- cp, ln, mv - copy, link or move files
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ccccpppp [ ----aaaaDDDDffffiiiirrrrRRRRpppp ----bbbb ssssiiiizzzzeeee ----ttttPPPP ----eeee size ] file1 [file2 ...] target
- llllnnnn [ ----ssssiiiiffff ] file1 [file2 ...] target
- mmmmvvvv [ ----iiiiffff ] file1 [file2 ...] target
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _f_i_l_e_1 is copied (linked, moved) to _t_a_r_g_e_t. Under no circumstance can
- _f_i_l_e_1 and _t_a_r_g_e_t be the same (take care when using _s_h(1) metacharacters).
- If _t_a_r_g_e_t is a directory, then one or more files are copied (linked,
- moved) to that directory. If _t_a_r_g_e_t is an existing file, its contents
- are destroyed, except in the llllnnnn and llllnnnn ----ssss case where the command will
- fail and llllnnnn will write a diagnostic message to standard error (use the ----iiii
- or ----ffff option to override this behavior). _N_O_T_E that this is a change from
- the historical llllnnnn execution.
-
- If _m_v or _l_n determines that the mode of _t_a_r_g_e_t forbids writing, it will
- print the mode (see _c_h_m_o_d(2)), ask for a response, and read the standard
- input for one line; if the line begins with yyyy, the _m_v or _l_n occurs, if
- permissible; if not, the command exits. When the ----ffff option is used or if
- the standard input is not a terminal, no questions are asked and the _m_v
- or _l_n is done. Additionally, if _t_a_r_g_e_t exists, then the ----ffff option will
- force the link when llllnnnn ----ssss is specified. If _c_p determines that the mode
- of _t_a_r_g_e_t forbids writing, the command will fail and _c_p will write a
- diagnostic message to standard error (use the ----iiii or ----ffff option to override
- this behavior).
-
- If the _----_ffff option is specified with _m_v, any previous occurrences of the _----_iiii
- option will be ignored.
-
- For _m_v, if _f_i_l_e_1 is a directory, _m_v will perform actions equivalent to
- the rrrreeeennnnaaaammmmeeee function. If this fails for any reasons other than those
- described for the errno [[[[EEEEXXXXDDDDEEEEVVVV]]]],,,, _m_v will write a diagnostic message to
- standard error, do nothing more with the current source file, and go on
- to any remaining source files. Otherwise, the file hierarchy rooted in
- _f_i_l_e_1 will be duplicated as a file hierarchy rooted in the destination
- path. The time of last data modification, the time of last access, the
- user ID and group ID and file mode will be duplicated. If the user ID,
- group ID or file mode of a regular file cannot be duplicated, the file
- mode bits SSSS____IIIISSSSUUUUIIIIDDDD and SSSS____IIIISSSSGGGGIIIIDDDD will not be duplicated. When files are
- duplicated to another file system, the invoking process must has read
- access to each file being duplicated. If the duplication of the file
- hierarchy fails for any reason, _m_v will write a diagnostic message to
- standard error, do nothing more with the current source_file, and go on
- to any remaining source_files. If the duplication of the file
- characteristics fails for any reason, mv will write a diagnostic message
- to standard error, but this failure will not cause _m_v to modify its exit
- status. If the copying or removal of _f_i_l_e_1 is prematurely terminated by
- a signal or error, _m_v may leave a partial copy of _f_i_l_e_1 at the source or
- destination. The _m_v utility will not modify both _f_i_l_e_1 and the
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- CCCCPPPP((((1111)))) CCCCPPPP((((1111))))
-
-
-
- destination path simultaneously; termination at any point will leave
- either _f_i_l_e_1 or the destination path complete.
-
- For _m_v, if _f_i_l_e_1 is a file and _t_a_r_g_e_t is a link to another file with
- links, the other links remain and _t_a_r_g_e_t becomes a new file.
-
- When _c_p is invoked, if _t_a_r_g_e_t is not an existing file, a new file is
- created which has the same mode as _f_i_l_e_1 except that the sticky bit is
- not set unless you are super-user; the owner and group of _t_a_r_g_e_t are
- those of the user. If _t_a_r_g_e_t is a file, copying a file into _t_a_r_g_e_t does
- not change its mode, owner or group. The last modification time of
- _t_a_r_g_e_t (and last access time, if _t_a_r_g_e_t did not exist) and the last
- access time of _f_i_l_e_1 are set to the time the copy was made. If _t_a_r_g_e_t is
- a link to a file, all links remain and the file is changed.
-
- When copying between XFS filesystems, _c_p will replicate holes in _f_i_l_e_1 in
- _t_a_r_g_e_t.
-
- If the _----_pppp option is specified, _c_p will duplicate the following
- characteristics of each source file in the corresponding destination
- file:
-
- 1111.... The time of last data modification and time of last access. If this
- duplication fails for any reason, _c_p will write a diagnostic message
- to standard error.
-
- 2222.... The user ID and group ID. If this duplication fails for any reason,
- _c_p will write a diagnostic message to standard error.
-
- 3333.... The file permission bits and the S_ISUID and S_ISGID bits. Other,
- implementation-dependent, bits may be duplicated as well. If this
- duplication fails for any reason, _c_p will write a diagnostic message
- to standard error.
-
- If the user ID or the group ID cannot be duplicated,
- the file permission bits S_ISUID and S_ISGID will be cleared. If
- these bits are present in the source file but are not duplicated in
- the destination file, _c_p will write a diagnostic message to standard
- error.
-
- The ----aaaa option to _c_p will copy user mode XFS attributes, the option is
- silently ignored if any of the files involved is not on an XFS
- filesystem.
-
- The ----DDDD option to _c_p specifies that direct IO should be used to copy the
- file, file data is not buffered in the kernel. The ----bbbb bbbblllloooocccckkkkssssiiiizzzzeeee option
- can be used to specify a specific blocksize to use, this option can also
- be used without ----DDDD .... Direct IO will only function on XFS and EFS
- filesystems.
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- CCCCPPPP((((1111)))) CCCCPPPP((((1111))))
-
-
-
- If the ----tttt option is specified then _c_p will attempt to create an output
- file on the realtime extent of the _t_a_r_g_e_t filesystem. The ----eeee eeeexxxxttttssssiiiizzzzeeee
- option can be used to specify an extent size other than the default for
- the filesystem. The ----PPPP option is used to indicate that the file size
- should be padded out to a legitimate size for a realtime file if _f_i_l_e_1 is
- not a legitimate size. The _t_a_r_g_e_t filesystem must be XFS for the ----tttt
- option to work.
-
- With the ----ssss option _l_n creates symbolic links. A symbolic link is a
- special kind of file whose contents are the name of another file (see
- _s_y_m_l_i_n_k(2)). A symbolic link contains the name of the file to which it
- is linked. Most system calls, including _o_p_e_n(2), _s_t_a_t(2), and _a_c_c_e_s_s(2),
- substitute these contents when the name of a symbolic link occurs in a
- pathname. This process is known as ``following'' symbolic links.
- _s_t_a_t(2), _r_e_a_d_l_i_n_k(2), _s_y_m_l_i_n_k(2), and _u_n_l_i_n_k(2) also do this
- substitution, except on the last component of the pathname. Thus, they
- are said not to ``follow'' symbolic links. Symbolic links may span file
- systems and may refer to directories. Note that _c_p ``follows'' symbolic
- links (except when using the ----RRRR option, while _m_v and _l_n do not ``follow''
- symbolic links.
-
- If the ----iiii option is specified with _c_p, _l_n, or _m_v and _t_a_r_g_e_t exists, the
- user is prompted with the message:
-
- overwrite _t_a_r_g_e_t?
-
- If the user answers with a line starting with `y', the move or copy
- continues. Any other reply prevents the command from completing. When
- creating soft links this warning often indicates that the user has
- swapped the _f_i_l_e and _t_a_r_g_e_t parameters, which results in replacement of
- the target file with a dangling symbolic link.
-
- If the _----_iiii option is specified with _m_v, any previous occurrences of the _----_ffff
- option will be ignored.
-
- If the ----rrrr or ----RRRR option is specified with _c_p and any of the source files
- are directories, _c_p copies each subtree rooted at that name; in this case
- target must be a directory. The difference between ----rrrr and ----RRRR is that ----rrrr
- causes _c_p to follow symbolic links and ----RRRR does not. (Note that the
- behavior of ----RRRR is defined by POSIX, whereas the behavior of ----rrrr is
- particular to this implementation.)
-
- If the ----RRRR option is specified with _c_p and the source file is not of type
- directory or regular file, then the following steps will be taken:
-
- 1111.... The _t_a_r_g_e_t file will be created with the same file type as _f_i_l_e_1.
-
- 2222.... If _f_i_l_e_1 is a type FIFO, the _t_a_r_g_e_t file permission bits will be the
- same as those of _f_i_l_e_1 modified by the file creation mask of the
- user if the _----_pppp option was not specified.
-
- If this creation fails for any reason, _c_p will write a diagnostic
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- CCCCPPPP((((1111)))) CCCCPPPP((((1111))))
-
-
-
- message to standard error, do nothing more with the source file and
- go on to any remaining files.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- chmod(1), cpio(1), rm(1).
-
- WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS
- _l_n without ----ssss will not link across file systems. This restriction is
- necessary because file systems can be added and removed.
-
- BBBBUUUUGGGGSSSS
- If _f_i_l_e_1 and _t_a_r_g_e_t lie on different file systems, _m_v must copy the file
- and delete the original. In this case any linking relationship with
- other files is lost.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-